<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <button id="btn">btn</button>
    <script src="./utils.js"></script>
    <script src="./reactive.js"></script>
    <script src="./render.js"></script>
    <script></script>
    <script>
      function findJ(arr) {
        let arr_max = [];
        let cache = [];
        for (var i = 0; i < arr.length; i++) {
          cache.push([]);
        }
        for (let i = 0; i < arr.length; i++) {
          for (let j = 0; j < i; j++) {
            if (arr[j] < arr[i]) {
              if (cache[i].length < cache[j].length + 1) {
                cache[i] = [].concat(cache[j]);
              }
            }
          }
          cache[i].push(arr[i]);
          if (cache[i].length > arr_max.length) {
            arr_max = [].concat(cache[i]);
          }
        }
        return arr_max;
      }
      console.log(findJ([4,6,1,2]));
    </script>
  </body>
</html>
